package part18_解释器模式_四则运算问题;

import java.util.HashMap;

/**
 * @ClassName: AddExpression
 * @Author: AllenSun
 * @Date: 2020/3/9 20:35
 */
public class AddExpression extends SymbolExpression {
    public AddExpression(Expression left, Expression right) {
        super(left, right);
    }

    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return super.left.interpreter(var)+super.right.interpreter(var);
    }
}
